/**
 * Created by mooshroom on 2014/11/26.
 */
$(document).keyup(function(event){
    $(function() {

        function Editor(input, preview){
            this.update = function () {
                preview.innerHTML = markdown.toHTML(input.value);
            };
            input.editor = this;
            this.update();
        }
        var $ = function (id) { return document.getElementById(id); };
        new Editor($("doc-main"), $("doc-show"));
        new Editor($("doc-main"), $("read-only"));
        var code = $("code");
        return false;
    });
});






